<template>
  <div>
    <h1 class="base red">这是登录组件{{ str }}</h1>
    <!-- <el-button type="primary">选择</el-button> -->
    <img src="https://profile.csdnimg.cn/4/4/5/3_qtfying" alt="" />
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      str: "9/13",
    };
  },
  mounted() {
    this.get();
    // this.get2();
  },
  methods: {
    get() {
        console.log(111113333, process.env.NODE_ENV)
        let base = ''
      if(process.env.NODE_ENV == 'production') {
        //   base = 'http://101.132.173.21'
          base = 'https://beibeibang.com.cn'
      }
      axios
        .get(base + "/api/sloop/extend/activity/all?activityType=3", {
          parmas: {
            id: 88,
          },
        })
        .then((res) => {
          console.log('1111111111',res);
          this.str = res.data.msg;
        })
        .catch((err) => {
          console.log(err);
        });
    },

    get2() {
        console.log(2222222)

      axios
        .get("/api", {
          parmas: {
            id: 88,
          },
        })
        .then((res) => {
          console.log('22222222',res);
          this.str = res.data.name;
        })
        .catch((err) => {
          console.log(err);
        });
    },
  },
};
</script>

<style scoped>
.red {
  color: red;
}
</style>